Java: Programming Basics for Absolute Beginners (Step-By-Step Java Book 1) by Nathan Clark

Java: Programming Basics for Absolute Beginners (Step-By-Step Java Book 1) by Nathan Clark

Author:Nathan Clark [Clark, Nathan]
Language: eng
Format: azw3, pdf
Publisher: Nathan Clark
Published: 2017-10-07T04:00:00+00:00


With this program, the output is as follows:

The value of i is 10.11111111

The value of j is -45.4444444

7.7 Char Data Type

This data type is used to define a single Unicode character.

Example 23: The following program is used to showcase the char data type.

// This is a Java class

public class Demo

{

// This is the main entry point of the Java program

public static void main(String args[])

{

// Initializing a variable

char i = 'A';

char j = 'a';

// Displaying the variable

System.out.println("The value of i is "+i);

System.out.println("The value of j is "+j);

}

}



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.